
const { ipcRenderer } = require('electron');

export const questionSubmitAI = (questionContent, context, callback) => {
    const replyKey = 'questionSubmit-reply';
    const params = {
      'replyKey': replyKey,
      'model':'llama3',
      'prompt': questionContent,
      'stream':false,
      'context':context
    };

    ipcRenderer.send('request-model', params);

    ipcRenderer.once(replyKey, function (event, data) {
      callback(data)
    })
}